package com.itheima.app;

import com.itheima.config.SpringConfig;
import com.itheima.dao.BookDao;
import com.itheima.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class App {
    public static void main(String[] args) {

        ApplicationContext app = new AnnotationConfigApplicationContext(SpringConfig.class);

        BookDao bookDao = app.getBean(BookDao.class);

        //bookDao.save();

        //bookDao.div(4, 0);
        UserService bean = app.getBean(UserService.class);
        bean.getUrl("     http://www.baidu.com    ", "   12345   ");

    }
}
